package demo

import (
	"gin-sns/app/ginframe/response"

	"github.com/gin-gonic/gin"
)

var ModalController = newModalController()

func newModalController() *modalController {
	return &modalController{}
}

type modalController struct {
}

func (c *modalController) Dialog(ctx *gin.Context) {
	response.BuildTpl(ctx, "demo/modal/dialog").WriteTpl()
}

func (c *modalController) Form(ctx *gin.Context) {
	response.BuildTpl(ctx, "demo/modal/form").WriteTpl()
}

func (c *modalController) Layer(ctx *gin.Context) {
	response.BuildTpl(ctx, "demo/modal/layer").WriteTpl()
}

func (c *modalController) Table(ctx *gin.Context) {
	response.BuildTpl(ctx, "demo/modal/table").WriteTpl()
}

func (c *modalController) Check(ctx *gin.Context) {
	response.BuildTpl(ctx, "demo/modal/table/check").WriteTpl()
}

func (c *modalController) Parent(ctx *gin.Context) {
	response.BuildTpl(ctx, "demo/modal/table/parent").WriteTpl()
}

func (c *modalController) Radio(ctx *gin.Context) {
	response.BuildTpl(ctx, "demo/modal/table/radio").WriteTpl()
}
